import 'package:flutter_deer/generated/json/base/json_convert_content.dart';
import 'package:flutter_deer/account/models/user_score_deposit_entity.dart';

BelowUserScoreDepositStatisticsEntity $BelowUserScoreDepositStatisticsEntityFromJson(Map<String, dynamic> json) {
  final BelowUserScoreDepositStatisticsEntity belowUserScoreDepositStatisticsEntity = BelowUserScoreDepositStatisticsEntity();
  final double? totalScore = jsonConvert.convert<double>(json['totalScore']);
  if (totalScore != null) {
    belowUserScoreDepositStatisticsEntity.totalScore = totalScore;
  }
  final int? totalTimes = jsonConvert.convert<int>(json['totalTimes']);
  if (totalTimes != null) {
    belowUserScoreDepositStatisticsEntity.totalTimes = totalTimes;
  }
  return belowUserScoreDepositStatisticsEntity;
}

Map<String, dynamic> $BelowUserScoreDepositStatisticsEntityToJson(BelowUserScoreDepositStatisticsEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['totalScore'] = entity.totalScore;
  data['totalTimes'] = entity.totalTimes;
  return data;
}

BelowUserScoreDepositEntity $BelowUserScoreDepositEntityFromJson(Map<String, dynamic> json) {
  final BelowUserScoreDepositEntity belowUserScoreDepositEntity = BelowUserScoreDepositEntity();
  final double? score = jsonConvert.convert<double>(json['score']);
  if (score != null) {
    belowUserScoreDepositEntity.score = score;
  }
  final double? beforeScore = jsonConvert.convert<double>(json['beforeScore']);
  if (beforeScore != null) {
    belowUserScoreDepositEntity.beforeScore = beforeScore;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    belowUserScoreDepositEntity.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    belowUserScoreDepositEntity.updateTime = updateTime;
  }
  final String? avatar = jsonConvert.convert<String>(json['avatar']);
  if (avatar != null) {
    belowUserScoreDepositEntity.avatar = avatar;
  }
  final String? accountId = jsonConvert.convert<String>(json['accountId']);
  if (accountId != null) {
    belowUserScoreDepositEntity.accountId = accountId;
  }
  final String? username = jsonConvert.convert<String>(json['username']);
  if (username != null) {
    belowUserScoreDepositEntity.username = username;
  }
  return belowUserScoreDepositEntity;
}

Map<String, dynamic> $BelowUserScoreDepositEntityToJson(BelowUserScoreDepositEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['score'] = entity.score;
  data['beforeScore'] = entity.beforeScore;
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['avatar'] = entity.avatar;
  data['accountId'] = entity.accountId;
  data['username'] = entity.username;
  return data;
}

UserScoreDepositEntity $UserScoreDepositEntityFromJson(Map<String, dynamic> json) {
  final UserScoreDepositEntity userScoreDepositEntity = UserScoreDepositEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    userScoreDepositEntity.id = id;
  }
  final String? bankId = jsonConvert.convert<String>(json['bankId']);
  if (id != null) {
    userScoreDepositEntity.bankId = bankId;
  }
  final String? bankName = jsonConvert.convert<String>(json['bankName']);
  if (bankName != null) {
    userScoreDepositEntity.bankName = bankName;
  }
  final String? bankLogo = jsonConvert.convert<String>(json['bankLogo']);
  if (bankLogo != null) {
    userScoreDepositEntity.bankLogo = bankLogo;
  }
  final String? bankUserName = jsonConvert.convert<String>(json['bankUserName']);
  if (bankUserName != null) {
    userScoreDepositEntity.bankUserName = bankUserName;
  }
  final String? cardNo = jsonConvert.convert<String>(json['cardNo']);
  if (cardNo != null) {
    userScoreDepositEntity.cardNo = cardNo;
  }
  final double? score = jsonConvert.convert<double>(json['score']);
  if (score != null) {
    userScoreDepositEntity.score = score;
  }
  final double? beforeScore = jsonConvert.convert<double>(json['beforeScore']);
  if (beforeScore != null) {
    userScoreDepositEntity.beforeScore = beforeScore;
  }
  final String? status = jsonConvert.convert<String>(json['status']);
  if (status != null) {
    userScoreDepositEntity.status = status;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    userScoreDepositEntity.remark = remark;
  }
  final String? createTimeStr = jsonConvert.convert<String>(json['createTimeStr']);
  if (createTimeStr != null) {
    userScoreDepositEntity.createTimeStr = createTimeStr;
  }
  final String? approvalTimeStr = jsonConvert.convert<String>(json['approvalTimeStr']);
  if (approvalTimeStr != null) {
    userScoreDepositEntity.approvalTimeStr = approvalTimeStr;
  }
  return userScoreDepositEntity;
}

Map<String, dynamic> $UserScoreDepositEntityToJson(UserScoreDepositEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['bankId'] = entity.bankId;
  data['bankName'] = entity.bankName;
  data['bankLogo'] = entity.bankLogo;
  data['bankUserName'] = entity.bankUserName;
  data['cardNo'] = entity.cardNo;
  data['score'] = entity.score;
  data['beforeScore'] = entity.beforeScore;
  data['status'] = entity.status;
  data['remark'] = entity.remark;
  data['createTimeStr'] = entity.createTimeStr;
  data['approvalTimeStr'] = entity.approvalTimeStr;
  return data;
}

BelowUserScoreDepositPageEntity $BelowUserScoreDepositPageEntityFromJson(Map<String, dynamic> json) {
  final BelowUserScoreDepositPageEntity belowUserScoreDepositPageEntity = BelowUserScoreDepositPageEntity();
  final int? total = jsonConvert.convert<int>(json['total']);
  if (total != null) {
    belowUserScoreDepositPageEntity.total = total;
  }
  final int? size = jsonConvert.convert<int>(json['size']);
  if (size != null) {
    belowUserScoreDepositPageEntity.size = size;
  }
  final int? current = jsonConvert.convert<int>(json['current']);
  if (current != null) {
    belowUserScoreDepositPageEntity.current = current;
  }
  final int? pages = jsonConvert.convert<int>(json['pages']);
  if (pages != null) {
    belowUserScoreDepositPageEntity.pages = pages;
  }
  final List<BelowUserScoreDepositEntity>? records = jsonConvert.convert<List<BelowUserScoreDepositEntity>>(json['records']);
  if (records != null) {
    belowUserScoreDepositPageEntity.records = records;
  }
  return belowUserScoreDepositPageEntity;
}

Map<String, dynamic> $BelowUserScoreDepositPageEntityToJson(BelowUserScoreDepositPageEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['total'] = entity.total;
  data['size'] = entity.size;
  data['current'] = entity.current;
  data['pages'] = entity.pages;
  data['records'] = entity.records;
  return data;
}

UserScoreDepositPageEntity $UserScoreDepositPageEntityFromJson(Map<String, dynamic> json) {
  final UserScoreDepositPageEntity userScoreDepositPageEntity = UserScoreDepositPageEntity();
  final int? total = jsonConvert.convert<int>(json['total']);
  if (total != null) {
    userScoreDepositPageEntity.total = total;
  }
  final int? size = jsonConvert.convert<int>(json['size']);
  if (size != null) {
    userScoreDepositPageEntity.size = size;
  }
  final int? current = jsonConvert.convert<int>(json['current']);
  if (current != null) {
    userScoreDepositPageEntity.current = current;
  }
  final int? pages = jsonConvert.convert<int>(json['pages']);
  if (pages != null) {
    userScoreDepositPageEntity.pages = pages;
  }
  final List<UserScoreDepositEntity>? records = jsonConvert.convert<List<UserScoreDepositEntity>>(json['records']);
  if (records != null) {
    userScoreDepositPageEntity.records = records;
  }
  return userScoreDepositPageEntity;
}

Map<String, dynamic> $UserScoreDepositPageEntityToJson(UserScoreDepositPageEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['total'] = entity.total;
  data['size'] = entity.size;
  data['current'] = entity.current;
  data['pages'] = entity.pages;
  data['records'] = entity.records;
  return data;
}
